

export type T_DeviceOrRelated_EntityKind_GeoLocation = -1;
export type T_DeviceOrRelated_EntityKind_Gpu         =  0;
export type T_DeviceOrRelated_EntityKind_Camera      =  1;

interface _T_ClientSide_RecordAbstraction<
    _T_Data      extends Record<string | symbol, any>,
    _T_ExtraOfUi extends Record<string | symbol, any> = Record<string | symbol, any>
> {
    /**
     * 目前，某些节点（暂时仅有【非设备类实体】这一种）的 id 允许在客户端设计，乃至变更。
     * 这意味着，在某个瞬间，正在修订的节点的 id 可能与其他节点的 id 相同。
     * 而客户端要求一个字段是绝对唯一的。
     * 故而设计一个客户端专用字段，该字段的值可确保唯一。
     */
    readonly clientSideTempKey: string;
    readonly parentNodeId:  null | T_DeviceOrRelated_EntityId;

    // readonly timeStamp: number;

    readonly data: _T_Data;
    _id?: string;

    readonly ui: {
        displayName: string;
    } & _T_ExtraOfUi;
}


export type T_DeviceOrRelated_ClientSide__AnyContext_RecordDetailsBase_Cam<
    _T_ExtraOfUi extends Record<string | symbol, any> = Record<string | symbol, any>
> = {
    readonly id: T_DeviceOrRelated_EntityId;
} & _T_ClientSide_RecordAbstraction<{
    alias?: string;
    readonly entityKind:    T_DeviceOrRelated_EntityKind_Camera;
    readonly isGeoLocation: false;
    readonly isDevice:      true;
    readonly isGpu:         false;
    readonly isCamera:      true;

    ipAddress:              string | '';
    readonly rtspStreamUri: null | string | '';
}, _T_ExtraOfUi>;



export type T_DeviceOrRelated_ClientSide_Tree2_Cam_NodeDetails = T_DeviceOrRelated_ClientSide__AnyContext_RecordDetailsBase_Cam<{
    hasAssignedToViewportOfThisIndex: undefined | (() => number);
    isOnline: boolean;
    isUsingRawRtspSignal: boolean;
    rtspFullUri_Raw: string;
    rtspFullUri_Infer: string;
    currentRtspUri: string;
    rtspFullUri_List: Array<{label: string; value: string}>;
}>;
